package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    //查询
    List<Category> findAll();

    //保存
    void save(Category category);

    //修改
    void update(Category category);

    //查询dish表中该id的次数
    Integer countDishByCategoryId(long id);

    //查询setmeal表中该id的次数
    Integer countSetmealByCategoryId(long id);

    //删除
    void delete(long id);
}
